import{createRouter,createWebHashHistory, RouterView} from 'vue-router'
import { h } from 'vue'
import component from 'element-plus/es/components/tree-select/src/tree-select-option.mjs'

const router=createRouter({
    history:createWebHashHistory(),
    routes:[
      { path: '/', redirect:'/store' },
      {
        path:'/login',
        component:()=>import('./components/login/login.vue')
      },
      {
        path:'/register',
        component:()=>import('./components/login/regist.vue')
      },
      {
        path:'/store',
        component:()=>import('./components/home/home.vue'),
        redirect:'/store/home',
        children:[
          {
            path:'home',
            component:()=>import('./components/index/index.vue'),
          },
          {
            path:'send',
            component:()=>import('./components/send/index.vue')
          },
          {
            path:'receive',
            component:()=>import('./components/receive/index.vue')
          },
          {
            path:'business',
            component:()=>import('./components/business/index.vue')
          },
          {
            path:'shop',
            component:()=>import('./components/shop/index.vue')
          },
          {
            path:'international',
            component:()=>import('./components/international/index.vue')
          },
          {
            path:'help',
            component:()=>import('./components/help/index.vue')
          },
          {
            path:'location',
            component:()=>import('./components/location/index.vue')
          },
          {
            path:'support',
            component:()=>import('./components/views/support.vue')
          }
        ]
      },
    ]
})
export default router